'''
Created on 2011-09-08

@author: kacper
'''
import unittest
from dataStructs.formulaSet import Theory
from config.config import getValidParseExamplesDirs
from dataStructs.definitions import Const


class Test(unittest.TestCase):
    
    def loadTheory(self, dataBaseFile):
        kb =  getValidParseExamplesDirs() +dataBaseFile 
        th = Theory(kb)    
        return th

    def setUp(self):
        pass


    def tearDown(self):
        pass


    def testSimapleGoalFromDB(self):
        th = self.loadTheory("/then3times.wn")
        goal = th.prepareGoal('a')
        self.assertTrue( str(goal) == '[[[~a], [[]]]]')
        goal = th.prepareGoal('b')
        self.assertTrue( str(goal) == '[[[~b], [[]]]]')
        goal = th.prepareGoal('w')
        self.assertTrue( str(goal) == '[[[~w], [[]]]]')

if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testSimapleGoalFromDB']
    unittest.main()